﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommonLibrary;
using DBO.Economy;
using DBO;

namespace ClientBusinessManagement
{
    public class ClientDataSingleton
    {
        private ClientDataSingleton()
        {
            createDictionaries();
        }

        public static readonly ClientDataSingleton Instance = new ClientDataSingleton();

        public DictionnaryRepository ResourceRepository { get { return _resDict; } }
        public Player Player { get; set; }

        private void createDictionaries()
        {
            _resDict = new DictionnaryRepository();

            _resDict.RegisterDictionnary<UnitStatistics>(new StatisticsDictionary());
            _resDict.RegisterDictionnary<Race>(new RaceDictionary());
            _resDict.RegisterDictionnary<Resources>(new ResourcesDictionary());
        }

        private DictionnaryRepository _resDict;
    }
}
